package com.csx.orm.mybatis.diy.service;

import com.csx.orm.mybatis.diy.entity.UserDIYEntity;
import com.csx.orm.mybatis.diy.mapper.UserDIYMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserDIYService {

    @Autowired
    private UserDIYMapper userDIYMapper;

    public List<UserDIYEntity> findAll() {
        return userDIYMapper.findAll();
    }

    public void insert(UserDIYEntity entity) {
        userDIYMapper.insert(entity);
    }

    public void update(UserDIYEntity entity) {
        userDIYMapper.update(entity);
    }

    public UserDIYEntity get(Long id) {
        return userDIYMapper.get(id);
    }
}
